﻿#ifndef USERPICKER_H
#define USERPICKER_H

#include <QDialog>
#include "userrelation.h"
#include "userrelationservice.h"

namespace Ui {
class UserPicker;
}

class UserPicker : public QDialog
{
    Q_OBJECT

public:
    explicit UserPicker(QWidget *parent = nullptr);
    ~UserPicker();

    void setWidgetType(UserRelation::RelationType widgetType);

    void setIsShowPlatformUser(bool isShowPlatformUser);

    void loadData();
signals:
    void selectedFinished(UserRelation *relation);

private slots:
    void on_lineEditQueryOverall_textChanged(const QString &arg1);

    void on_lineEditQueryContact_textChanged(const QString &arg1);

    void on_lineEditQueryNickName_textChanged(const QString &arg1);

    void on_lineEditQueryTel_textChanged(const QString &arg1);

    void on_pushButtonQueryClear_clicked();

    void on_pushButtonUpdateData_clicked();

private:
    Ui::UserPicker *ui;

    UserRelation::RelationType widgetType;
    UserRelationService userRelationService;

    bool isShowPlatformUser;//是否显示平台用户
};

#endif // USERPICKER_H
